<?php
namespace Api\Controller;
use Think\Controller;
class IndexController extends Controller {

    public function index(){
        $this->display();    	
    }

    public function getUser()
    {
        include "/Application/Common/Common/YxUtils.php";
        $appkey = '98a51dd54e15912adb7b21a09c5f79c0';
        $secret = 'b8f9712ccc30';
        $obj = new \YxUtils($appkey, $secret);

        // file_put_contents('post.log', print_r($_POST, true)."\n---\n", FILE_APPEND);

        $res = $obj->sendMsg('zhangsan666789', 0, 'zhangsan', 0, array('msg'=>'你是谁？'));
        // sendMsg($from,$ope,$to,$type,$body,$option='{"push":false,"roam":true,"history":false,"sendersync":true, "route":false}',$pushcontent='')
        // var_dump($obj);
        // $res = $obj->createUserId('zhangsan666789');
        file_put_contents('result.log', print_r($res, true)."\n", FILE_APPEND);
    }
    
}